<?php
if (!defined('INDEX')) {
	exit ('Access Denied');
}

$parameter=act_wap_register();
extract($parameter);

if($_GET['web']){
	$web=$_GET['web'];
	$webid=$_GET['webid'];
	$webname=$_GET['webname'];
}

include(TPLPATH.'/inc/header_3.tpl.php');$css[]=TPLURL."/inc/css/common.css";$css[]=TPLURL."/inc/css/vipduo.css";echo css($css);unset($css);$js[]=TPLURL.'/inc/js/jquery.js';$js[]=TPLURL.'/inc/js/fun.js';$js[]=TPLURL.'/inc/js/jquery.lazyload.js';echo js($js);unset($js);
?><style type="text/css"> .fixtop {	width: 100%;	height: 44px;	background:<?=$dd_tpl_data['color']?>; overflow:hidden}.jl_tj{ width:99%; height:38px;line-height:38px; text-align:center; display:block; background:#fff; border:1px #E7E7E7 solid; color:#000; cursor:pointer; font-size:1.4em;border-radius:3px; }.jl_tj:hover{ opacity:0.8; }.jl_tj2{ width:100%; height:38px;line-height:38px; text-align:center; display:block; background:<?=$dd_tpl_data['color']?>;  color:#fff; cursor:pointer; font-size:1.4em;border-radius:3px; }.jl_tj2:hover{ opacity:0.8; }.register_dl{ margin:0 15px; width:92%; height:45px; background:#FFFFFF; border:1px <?=$dd_tpl_data['color']?> solid; color:<?=$dd_tpl_data['color']?>; font-weight:500;font-family:Microsoft YaHei;  cursor:pointer; font-size:18px;border-radius:2px; }.register_dl:hover{ opacity:0.8; }.tijiao{ width:80px; height:37px; background:<?=$dd_tpl_data['color']?>;border:0; color:#FFFFFF; cursor:pointer; font-size:16px; }.tijiao:hover{ opacity:0.8; }.register_tc{ background:#fff; border:1px #E7E7E7 solid; margin:0 10px 0 10px;text-align:center;margin-top:10px;margin-bottom:10px;padding:12px;border-radius:3px; }.register_tc a{font-size:16px; color:<?=$dd_tpl_data['color']?>;}.register_tc:hover{ opacity:0.8; }.nr img{ width:300px;}</style></style>
<script>
function cbCheckForm(input,$form){
	var url='<?=wap_l('user',ACT)?>';
	url=ddJoin(url,input);
	$('#tijiao').val('提交中...');
	$.ajax({
		url: url,
		dataType:'jsonp',
		jsonp:"callback",
		success: function(data){
			if(data.s==1){
				ddAlert('注册成功','<?=wap_l('user')?>');
			}
			else{
				getYzm();
				alert(data.r);
				$('#tijiao').val('注册');
			}
		}
	});
	return false;
}

function getYzm(){
	$('#yzmimg').attr('src','<?=CURURL?>/comm/showpic.php?easy=1&t='+time());
}
</script>
 <div class="register">
  <form onSubmit="return checkForm($(this),cbCheckForm)">
	<?php if($_GET['web']){?>
	<dl><div style="line-height:2em; padding-left:2em"><?=$webname?>，您好！您已经用<?php $t=reg_web_email($webid . '@' . $web . '.com');echo $t[0]?>成功登录<?=WEBNAME?>，<br/>请完善以下信息以便更好使用我们网站。</div></dl>
    <?php }?>
   <table border="0" align="left" cellpadding="0" cellspacing="0" bordercolorlight="#9acd32" width="100%">
		
		<tr height="40">
		  <td><input id="email" name="email" value="" placeholder="输入您的邮箱" class="ddinput" dd-required dd-type="email"></td>
		</tr>
		<tr height="40">
		  <td><input id="username" name="username" class="ddinput" placeholder="请输入用户名" value="<?=$webname?>" dd-required type="text" /></td>
		</tr>
		<tr height="40">
		  <td><input id="password" name="password" class="ddinput" placeholder="请输入密码" value="" dd-required type="password"></td>
		</tr>
		<tr height="40">
		  <td><input id="password_confirm" name="password_confirm" class="ddinput" dd-required placeholder="重复上面的密码" value="" type="password"></td>
		</tr>
		 <?php if($webset['user']['need_qq']==1){?>
		<tr height="40">
		  <td><input id="qq" name="qq" value="" dd-type="num" class="ddinput" placeholder="输入您的QQ账号" dd-required></td>
		</tr> 
		<?php }?>
		 <?php if($webset['user']['need_tbnick']==1){?>
		<tr height="40">
		  <td><input id="tbnick" name="tbnick" value=""  class="ddinput"placeholder="输入您的淘宝账号" dd-required></td>
		</tr><?php }?>
		 <?php if($webset['user']['need_alipay']==1){?>
		<tr height="40">
		  <td><input id="alipay" name="alipay" dd-type="alipay" class="ddinput" dd-required value="" placeholder="输入您的支付宝账号"></td>
		</tr><?php }?>
    <?php 
	if($webset['user']['need_tjr']==0){
		$tjr = (int) get_cookie("tjr");
		if($tjr>0){
			$trjname=$duoduo->select('user','ddusername','id="'.$tjr.'"');
		}
		else{
			$trjname='';
		}
	?>
    <tr height="40"><td><input id="tjrname" name="tjrname" class="ddinput" value="<?=$trjname?>" placeholder="输入您的推荐人账号"></td>
		</tr>
    <?php }?>
   <tr height="40">
		  <td><input id="captcha" name="captcha" value="" class="ddinput" placeholder="验证码" dd-required dd-type="num" dd-minl="4" dd-maxl="4" style='width:160px;'/><span style=" height:40px; padding-top:20px"> <img id="yzmimg" src="" height="30"  onClick="getYzm()"></span></td>
		</tr>
<script>
getYzm();
</script>   		
   <tr height="40">
		  <td height="80" colspan="2"> 
		    <?php if($_GET['web']){?>
   <input type="hidden" name="web" value="<?=$web?>"/><input type="hidden" name="webid" value="<?=$webid?>"/><input type="hidden" name="webname" value="<?=$webname?>"/>
   <?php }?>
    <input type="hidden" name="sub" value="1"/>
          <input type="submit" value="立即注册" id="tijiao"  class="register_dl"></td>
		  <td></td>
		</tr>
	  </table> 		
    </form>
</div>
  <div class="p15">
<span style="float:center; font-size:14px; color:#888">已经有账号<a href="<?=wap_l('user','login')?>"><font color="#FF0000">立即登录</font></a></span> 
  <div class="h30"></div>
	<?php if(!empty($dd_tpl_data['apilogin'])){?>
<section class="other_login">
   <h4>——————  使用合作账号登录  ——————</h4>
 <?php if(isset($dd_tpl_data['apilogin']['qq']) && $dd_tpl_data['apilogin']['qq']==1){?>
 <li><a href="<?=wap_l('user','weblogin',array('a'=>'qq','action'=>urlencode($from)))?>" title="QQ账号登录" class="qq"></a></li>
  <?php }?>
   <?php if(isset($dd_tpl_data['apilogin']['tb']) && $dd_tpl_data['apilogin']['tb']==1){?>
  <li><a href="<?=wap_l('user','weblogin',array('a'=>'tb','action'=>urlencode($from)))?>" title="淘宝账号登录" class="tb"></a></li>
  <?php }?>
<?php if(isset($dd_tpl_data['apilogin']['sina']) && $dd_tpl_data['apilogin']['sina']==1){?>
 <li><a href="<?=wap_l('user','weblogin',array('a'=>'sina','action'=>urlencode($from)))?>" title="新浪账号登录" class="sina"></a></li>
  <?php }?>
</section>
<?php }?>
     </div>  
  </div>
 <div class="clear"></div>  <?php include(TPLPATH.'/inc/footer.tpl.php');?>